In solid state image sensors providing color images, an array of pixels is overlaid with a pattern of color filters. One common pattern is the Bayer pattern in which alternate rows are G, R, G, R . . . and B, G, B, G . . . . It is usual for the output from the image sensor to be processed to give RGB values for each pixel.
In the prior art such processing is carried out in hardware and known approaches make different trade-offs between image quality and computational load or circuit complexity. See, for example, U.S. Pat. No. 6,757,012 (Hubena et al.), U.S. Pat. No. 5,008,739 (D'Luna et al.) and U.S. Pat. No. 3,971,065 (Bayer et al.).